package listener;

import javax.servlet.ServletRequestAttributeEvent;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpServletRequest;

@WebListener
public class Mylistener0 implements ServletRequestAttributeListener{
    @Override
    public void attributeAdded(ServletRequestAttributeEvent event) {
        HttpServletRequest requet=(HttpServletRequest) event.getServletRequest();
        System.out.println("添加名称:"+event.getName()+"值:"+event.getValue());
    }

    @Override
    public void attributeRemoved(ServletRequestAttributeEvent event) {
        HttpServletRequest request=(HttpServletRequest) event.getServletRequest();
        System.out.println("移除名称"+event.getName()+",值:"+event.getValue());
    }

    @Override
    public void attributeReplaced(ServletRequestAttributeEvent event) {

    }
}
